//
//  RootViewController.m
//  GroupInfo
//
//  Created by dllo on 15/11/5.
//  Copyright (c) 2015年 ZKJ. All rights reserved.
//

#import "RootViewController.h"

@interface RootViewController ()<UITableViewDataSource, UITableViewDelegate>

@end

@implementation RootViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.view.backgroundColor = [UIColor whiteColor];
    UITableView *tableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
    tableView.delegate = self;
    tableView.dataSource = self;
    [self.view addSubview:tableView];
    [tableView release];
    tableView.sectionIndexTrackingBackgroundColor = [UIColor blueColor];
    [tableView setSeparatorColor:[UIColor redColor]];
    [tableView setSeparatorStyle:UITableViewCellSeparatorStyleSingleLineEtched];
    
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 6;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    UITableViewCell *tableViewCell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"a"];
    
    if (indexPath.row == 0) {
        tableViewCell.textLabel.text = @"郑凯杰";
        tableViewCell.detailTextLabel.text = @"年龄22";
        tableViewCell.imageView.image = [UIImage imageNamed:@"Image"];
    } else if (indexPath.row == 1) {
        tableViewCell.textLabel.text = @"朱琛";
                tableViewCell.detailTextLabel.text = @"年龄22";
        tableViewCell.imageView.image = [UIImage imageNamed:@"Image-1"];
    } else if (indexPath.row == 2) {
        tableViewCell.textLabel.text = @"崔宇航";
        tableViewCell.detailTextLabel.text = @"年龄22";
        tableViewCell.imageView.image = [UIImage imageNamed:@"Image-2"];
    } else if (indexPath.row == 3) {
        tableViewCell.textLabel.text = @"乔爽";
        tableViewCell.detailTextLabel.text = @"年龄22";
        tableViewCell.imageView.image = [UIImage imageNamed:@"Image-3"];
    } else if (indexPath.row == 4) {
        tableViewCell.textLabel.text = @"吴长春";
        tableViewCell.detailTextLabel.text = @"年龄22";
        tableViewCell.imageView.image = [UIImage imageNamed:@"Image-4"];
    } else if (indexPath.row == 5) {
        tableViewCell.textLabel.text = @"郑举廷";
        tableViewCell.detailTextLabel.text = @"年龄22";
        tableViewCell.imageView.image = [UIImage imageNamed:@"Image-5"];
    }
    
    NSLog(@"哈哈");
    
    NSLog(@"|asda");
//    tableViewCell.textLabel.text = @"老王最帅";
//    tableViewCell.detailTextLabel.text = @"老王真尼玛帅";
//    tableViewCell.imageView.image = [UIImage imageNamed:@"Image"];
    return tableViewCell;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
